﻿using System;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Xml;
using System.Xml.Serialization;
using SubSonic;
using SubSonic.Utilities;

namespace Medianamik.UI.Web.Shop.Data
{
    /// <summary>
    /// Strongly-typed collection for the ProductWithCategory class.
    /// </summary>
    [Serializable]
    public partial class ProductWithCategoryCollection : ReadOnlyList<ProductWithCategory, ProductWithCategoryCollection>
    {
        public ProductWithCategoryCollection() { }
    }
    /// <summary>
    /// This is  Read-only wrapper class for the vw_ProductWithCategory view.
    /// </summary>
    [Serializable]
    public partial class ProductWithCategory : ReadOnlyRecord<ProductWithCategory>, IReadOnlyRecord
    {

        #region Default Settings
        protected static void SetSQLProps()
        {
            GetTableSchema();
        }
        #endregion
        #region Schema Accessor
        public static TableSchema.Table Schema
        {
            get
            {
                if (BaseSchema == null)
                {
                    SetSQLProps();
                }
                return BaseSchema;
            }
        }

        private static void GetTableSchema()
        {
            if (!IsSchemaInitialized)
            {
                //Schema declaration
                TableSchema.Table schema = new TableSchema.Table("vw_ProductWithCategory", TableType.View, DataService.GetInstance("MedianamikProvider"));
                schema.Columns = new TableSchema.TableColumnCollection();
                schema.SchemaName = @"dbo";
                //columns

                TableSchema.TableColumn colvarId = new TableSchema.TableColumn(schema);
                colvarId.ColumnName = "Id";
                colvarId.DataType = DbType.Guid;
                colvarId.MaxLength = 0;
                colvarId.AutoIncrement = false;
                colvarId.IsNullable = false;
                colvarId.IsPrimaryKey = false;
                colvarId.IsForeignKey = false;
                colvarId.IsReadOnly = false;

                schema.Columns.Add(colvarId);

                TableSchema.TableColumn colvarExergue = new TableSchema.TableColumn(schema);
                colvarExergue.ColumnName = "Exergue";
                colvarExergue.DataType = DbType.AnsiString;
                colvarExergue.MaxLength = 500;
                colvarExergue.AutoIncrement = false;
                colvarExergue.IsNullable = true;
                colvarExergue.IsPrimaryKey = false;
                colvarExergue.IsForeignKey = false;
                colvarExergue.IsReadOnly = false;

                schema.Columns.Add(colvarExergue);

                TableSchema.TableColumn colvarBrand = new TableSchema.TableColumn(schema);
                colvarBrand.ColumnName = "Brand";
                colvarBrand.DataType = DbType.Guid;
                colvarBrand.MaxLength = 0;
                colvarBrand.AutoIncrement = false;
                colvarBrand.IsNullable = true;
                colvarBrand.IsPrimaryKey = false;
                colvarBrand.IsForeignKey = false;
                colvarBrand.IsReadOnly = false;

                schema.Columns.Add(colvarBrand);

                TableSchema.TableColumn colvarPrice = new TableSchema.TableColumn(schema);
                colvarPrice.ColumnName = "Price";
                colvarPrice.DataType = DbType.Double;
                colvarPrice.MaxLength = 0;
                colvarPrice.AutoIncrement = false;
                colvarPrice.IsNullable = true;
                colvarPrice.IsPrimaryKey = false;
                colvarPrice.IsForeignKey = false;
                colvarPrice.IsReadOnly = false;

                schema.Columns.Add(colvarPrice);

                TableSchema.TableColumn colvarImage = new TableSchema.TableColumn(schema);
                colvarImage.ColumnName = "Image";
                colvarImage.DataType = DbType.AnsiString;
                colvarImage.MaxLength = 500;
                colvarImage.AutoIncrement = false;
                colvarImage.IsNullable = true;
                colvarImage.IsPrimaryKey = false;
                colvarImage.IsForeignKey = false;
                colvarImage.IsReadOnly = false;

                schema.Columns.Add(colvarImage);

                TableSchema.TableColumn colvarSmallImage = new TableSchema.TableColumn(schema);
                colvarSmallImage.ColumnName = "SmallImage";
                colvarSmallImage.DataType = DbType.AnsiString;
                colvarSmallImage.MaxLength = 500;
                colvarSmallImage.AutoIncrement = false;
                colvarSmallImage.IsNullable = true;
                colvarSmallImage.IsPrimaryKey = false;
                colvarSmallImage.IsForeignKey = false;
                colvarSmallImage.IsReadOnly = false;

                schema.Columns.Add(colvarSmallImage);

                TableSchema.TableColumn colvarName = new TableSchema.TableColumn(schema);
                colvarName.ColumnName = "Name";
                colvarName.DataType = DbType.AnsiString;
                colvarName.MaxLength = 100;
                colvarName.AutoIncrement = false;
                colvarName.IsNullable = true;
                colvarName.IsPrimaryKey = false;
                colvarName.IsForeignKey = false;
                colvarName.IsReadOnly = false;

                schema.Columns.Add(colvarName);

                TableSchema.TableColumn colvarUrl = new TableSchema.TableColumn(schema);
                colvarUrl.ColumnName = "Url";
                colvarUrl.DataType = DbType.AnsiString;
                colvarUrl.MaxLength = 8000;
                colvarUrl.AutoIncrement = false;
                colvarUrl.IsNullable = true;
                colvarUrl.IsPrimaryKey = false;
                colvarUrl.IsForeignKey = false;
                colvarUrl.IsReadOnly = false;

                schema.Columns.Add(colvarUrl);

                TableSchema.TableColumn colvarTitle = new TableSchema.TableColumn(schema);
                colvarTitle.ColumnName = "Title";
                colvarTitle.DataType = DbType.AnsiString;
                colvarTitle.MaxLength = 1000;
                colvarTitle.AutoIncrement = false;
                colvarTitle.IsNullable = true;
                colvarTitle.IsPrimaryKey = false;
                colvarTitle.IsForeignKey = false;
                colvarTitle.IsReadOnly = false;

                schema.Columns.Add(colvarTitle);

                TableSchema.TableColumn colvarHeaderImage = new TableSchema.TableColumn(schema);
                colvarHeaderImage.ColumnName = "HeaderImage";
                colvarHeaderImage.DataType = DbType.AnsiString;
                colvarHeaderImage.MaxLength = 500;
                colvarHeaderImage.AutoIncrement = false;
                colvarHeaderImage.IsNullable = true;
                colvarHeaderImage.IsPrimaryKey = false;
                colvarHeaderImage.IsForeignKey = false;
                colvarHeaderImage.IsReadOnly = false;

                schema.Columns.Add(colvarHeaderImage);

                TableSchema.TableColumn colvarUseInChildUrls = new TableSchema.TableColumn(schema);
                colvarUseInChildUrls.ColumnName = "UseInChildUrls";
                colvarUseInChildUrls.DataType = DbType.Boolean;
                colvarUseInChildUrls.MaxLength = 0;
                colvarUseInChildUrls.AutoIncrement = false;
                colvarUseInChildUrls.IsNullable = true;
                colvarUseInChildUrls.IsPrimaryKey = false;
                colvarUseInChildUrls.IsForeignKey = false;
                colvarUseInChildUrls.IsReadOnly = false;

                schema.Columns.Add(colvarUseInChildUrls);

                TableSchema.TableColumn colvarContent = new TableSchema.TableColumn(schema);
                colvarContent.ColumnName = "Content";
                colvarContent.DataType = DbType.String;
                colvarContent.MaxLength = -1;
                colvarContent.AutoIncrement = false;
                colvarContent.IsNullable = true;
                colvarContent.IsPrimaryKey = false;
                colvarContent.IsForeignKey = false;
                colvarContent.IsReadOnly = false;

                schema.Columns.Add(colvarContent);

                TableSchema.TableColumn colvarBrowserTitle = new TableSchema.TableColumn(schema);
                colvarBrowserTitle.ColumnName = "BrowserTitle";
                colvarBrowserTitle.DataType = DbType.AnsiString;
                colvarBrowserTitle.MaxLength = 500;
                colvarBrowserTitle.AutoIncrement = false;
                colvarBrowserTitle.IsNullable = true;
                colvarBrowserTitle.IsPrimaryKey = false;
                colvarBrowserTitle.IsForeignKey = false;
                colvarBrowserTitle.IsReadOnly = false;

                schema.Columns.Add(colvarBrowserTitle);

                TableSchema.TableColumn colvarContentBlock = new TableSchema.TableColumn(schema);
                colvarContentBlock.ColumnName = "ContentBlock";
                colvarContentBlock.DataType = DbType.AnsiString;
                colvarContentBlock.MaxLength = 8000;
                colvarContentBlock.AutoIncrement = false;
                colvarContentBlock.IsNullable = true;
                colvarContentBlock.IsPrimaryKey = false;
                colvarContentBlock.IsForeignKey = false;
                colvarContentBlock.IsReadOnly = false;

                schema.Columns.Add(colvarContentBlock);

                TableSchema.TableColumn colvarMetaKeywords = new TableSchema.TableColumn(schema);
                colvarMetaKeywords.ColumnName = "MetaKeywords";
                colvarMetaKeywords.DataType = DbType.AnsiString;
                colvarMetaKeywords.MaxLength = 1500;
                colvarMetaKeywords.AutoIncrement = false;
                colvarMetaKeywords.IsNullable = true;
                colvarMetaKeywords.IsPrimaryKey = false;
                colvarMetaKeywords.IsForeignKey = false;
                colvarMetaKeywords.IsReadOnly = false;

                schema.Columns.Add(colvarMetaKeywords);

                TableSchema.TableColumn colvarMetaDescription = new TableSchema.TableColumn(schema);
                colvarMetaDescription.ColumnName = "MetaDescription";
                colvarMetaDescription.DataType = DbType.AnsiString;
                colvarMetaDescription.MaxLength = 1500;
                colvarMetaDescription.AutoIncrement = false;
                colvarMetaDescription.IsNullable = true;
                colvarMetaDescription.IsPrimaryKey = false;
                colvarMetaDescription.IsForeignKey = false;
                colvarMetaDescription.IsReadOnly = false;

                schema.Columns.Add(colvarMetaDescription);

                TableSchema.TableColumn colvarNodeId = new TableSchema.TableColumn(schema);
                colvarNodeId.ColumnName = "NodeId";
                colvarNodeId.DataType = DbType.Guid;
                colvarNodeId.MaxLength = 0;
                colvarNodeId.AutoIncrement = false;
                colvarNodeId.IsNullable = false;
                colvarNodeId.IsPrimaryKey = false;
                colvarNodeId.IsForeignKey = false;
                colvarNodeId.IsReadOnly = false;

                schema.Columns.Add(colvarNodeId);

                TableSchema.TableColumn colvarCultureName = new TableSchema.TableColumn(schema);
                colvarCultureName.ColumnName = "CultureName";
                colvarCultureName.DataType = DbType.String;
                colvarCultureName.MaxLength = 10;
                colvarCultureName.AutoIncrement = false;
                colvarCultureName.IsNullable = false;
                colvarCultureName.IsPrimaryKey = false;
                colvarCultureName.IsForeignKey = false;
                colvarCultureName.IsReadOnly = false;

                schema.Columns.Add(colvarCultureName);

                TableSchema.TableColumn colvarIsActive = new TableSchema.TableColumn(schema);
                colvarIsActive.ColumnName = "IsActive";
                colvarIsActive.DataType = DbType.Boolean;
                colvarIsActive.MaxLength = 0;
                colvarIsActive.AutoIncrement = false;
                colvarIsActive.IsNullable = false;
                colvarIsActive.IsPrimaryKey = false;
                colvarIsActive.IsForeignKey = false;
                colvarIsActive.IsReadOnly = false;

                schema.Columns.Add(colvarIsActive);

                TableSchema.TableColumn colvarIsSubEntity = new TableSchema.TableColumn(schema);
                colvarIsSubEntity.ColumnName = "IsSubEntity";
                colvarIsSubEntity.DataType = DbType.Boolean;
                colvarIsSubEntity.MaxLength = 0;
                colvarIsSubEntity.AutoIncrement = false;
                colvarIsSubEntity.IsNullable = false;
                colvarIsSubEntity.IsPrimaryKey = false;
                colvarIsSubEntity.IsForeignKey = false;
                colvarIsSubEntity.IsReadOnly = false;

                schema.Columns.Add(colvarIsSubEntity);

                TableSchema.TableColumn colvarHasModifications = new TableSchema.TableColumn(schema);
                colvarHasModifications.ColumnName = "HasModifications";
                colvarHasModifications.DataType = DbType.Boolean;
                colvarHasModifications.MaxLength = 0;
                colvarHasModifications.AutoIncrement = false;
                colvarHasModifications.IsNullable = false;
                colvarHasModifications.IsPrimaryKey = false;
                colvarHasModifications.IsForeignKey = false;
                colvarHasModifications.IsReadOnly = false;

                schema.Columns.Add(colvarHasModifications);

                TableSchema.TableColumn colvarRevision = new TableSchema.TableColumn(schema);
                colvarRevision.ColumnName = "Revision";
                colvarRevision.DataType = DbType.Int32;
                colvarRevision.MaxLength = 0;
                colvarRevision.AutoIncrement = false;
                colvarRevision.IsNullable = true;
                colvarRevision.IsPrimaryKey = false;
                colvarRevision.IsForeignKey = false;
                colvarRevision.IsReadOnly = false;

                schema.Columns.Add(colvarRevision);

                TableSchema.TableColumn colvarGeneration = new TableSchema.TableColumn(schema);
                colvarGeneration.ColumnName = "Generation";
                colvarGeneration.DataType = DbType.Int32;
                colvarGeneration.MaxLength = 0;
                colvarGeneration.AutoIncrement = false;
                colvarGeneration.IsNullable = false;
                colvarGeneration.IsPrimaryKey = false;
                colvarGeneration.IsForeignKey = false;
                colvarGeneration.IsReadOnly = false;

                schema.Columns.Add(colvarGeneration);

                TableSchema.TableColumn colvarCreatedOn = new TableSchema.TableColumn(schema);
                colvarCreatedOn.ColumnName = "CreatedOn";
                colvarCreatedOn.DataType = DbType.DateTime;
                colvarCreatedOn.MaxLength = 0;
                colvarCreatedOn.AutoIncrement = false;
                colvarCreatedOn.IsNullable = false;
                colvarCreatedOn.IsPrimaryKey = false;
                colvarCreatedOn.IsForeignKey = false;
                colvarCreatedOn.IsReadOnly = false;

                schema.Columns.Add(colvarCreatedOn);

                TableSchema.TableColumn colvarDepth = new TableSchema.TableColumn(schema);
                colvarDepth.ColumnName = "Depth";
                colvarDepth.DataType = DbType.Int32;
                colvarDepth.MaxLength = 0;
                colvarDepth.AutoIncrement = false;
                colvarDepth.IsNullable = false;
                colvarDepth.IsPrimaryKey = false;
                colvarDepth.IsForeignKey = false;
                colvarDepth.IsReadOnly = false;

                schema.Columns.Add(colvarDepth);

                TableSchema.TableColumn colvarParentNodeId = new TableSchema.TableColumn(schema);
                colvarParentNodeId.ColumnName = "ParentNodeId";
                colvarParentNodeId.DataType = DbType.Guid;
                colvarParentNodeId.MaxLength = 0;
                colvarParentNodeId.AutoIncrement = false;
                colvarParentNodeId.IsNullable = true;
                colvarParentNodeId.IsPrimaryKey = false;
                colvarParentNodeId.IsForeignKey = false;
                colvarParentNodeId.IsReadOnly = false;

                schema.Columns.Add(colvarParentNodeId);

                TableSchema.TableColumn colvarPath = new TableSchema.TableColumn(schema);
                colvarPath.ColumnName = "Path";
                colvarPath.DataType = DbType.AnsiString;
                colvarPath.MaxLength = 500;
                colvarPath.AutoIncrement = false;
                colvarPath.IsNullable = false;
                colvarPath.IsPrimaryKey = false;
                colvarPath.IsForeignKey = false;
                colvarPath.IsReadOnly = false;

                schema.Columns.Add(colvarPath);

                TableSchema.TableColumn colvarPosition = new TableSchema.TableColumn(schema);
                colvarPosition.ColumnName = "Position";
                colvarPosition.DataType = DbType.Int16;
                colvarPosition.MaxLength = 0;
                colvarPosition.AutoIncrement = false;
                colvarPosition.IsNullable = false;
                colvarPosition.IsPrimaryKey = false;
                colvarPosition.IsForeignKey = false;
                colvarPosition.IsReadOnly = false;

                schema.Columns.Add(colvarPosition);

                TableSchema.TableColumn colvarTypeId = new TableSchema.TableColumn(schema);
                colvarTypeId.ColumnName = "TypeId";
                colvarTypeId.DataType = DbType.Guid;
                colvarTypeId.MaxLength = 0;
                colvarTypeId.AutoIncrement = false;
                colvarTypeId.IsNullable = false;
                colvarTypeId.IsPrimaryKey = false;
                colvarTypeId.IsForeignKey = false;
                colvarTypeId.IsReadOnly = false;

                schema.Columns.Add(colvarTypeId);

                TableSchema.TableColumn colvarModifiedOn = new TableSchema.TableColumn(schema);
                colvarModifiedOn.ColumnName = "ModifiedOn";
                colvarModifiedOn.DataType = DbType.DateTime;
                colvarModifiedOn.MaxLength = 0;
                colvarModifiedOn.AutoIncrement = false;
                colvarModifiedOn.IsNullable = true;
                colvarModifiedOn.IsPrimaryKey = false;
                colvarModifiedOn.IsForeignKey = false;
                colvarModifiedOn.IsReadOnly = false;

                schema.Columns.Add(colvarModifiedOn);

                TableSchema.TableColumn colvarBrandName = new TableSchema.TableColumn(schema);
                colvarBrandName.ColumnName = "BrandName";
                colvarBrandName.DataType = DbType.AnsiString;
                colvarBrandName.MaxLength = 100;
                colvarBrandName.AutoIncrement = false;
                colvarBrandName.IsNullable = true;
                colvarBrandName.IsPrimaryKey = false;
                colvarBrandName.IsForeignKey = false;
                colvarBrandName.IsReadOnly = false;

                schema.Columns.Add(colvarBrandName);

                TableSchema.TableColumn colvarCategories = new TableSchema.TableColumn(schema);
                colvarCategories.ColumnName = "Categories";
                colvarCategories.DataType = DbType.Guid;
                colvarCategories.MaxLength = 0;
                colvarCategories.AutoIncrement = false;
                colvarCategories.IsNullable = true;
                colvarCategories.IsPrimaryKey = false;
                colvarCategories.IsForeignKey = false;
                colvarCategories.IsReadOnly = false;

                schema.Columns.Add(colvarCategories);


                BaseSchema = schema;
                //add this schema to the provider
                //so we can query it later
                DataService.Providers["MedianamikProvider"].AddSchema("vw_ProductWithCategory", schema);
            }
        }
        #endregion

        #region Query Accessor
        public static Query CreateQuery()
        {
            return new Query(Schema);
        }
        #endregion

        #region .ctors
        public ProductWithCategory()
        {
            SetSQLProps();
            SetDefaults();
            MarkNew();
        }
        public ProductWithCategory(bool useDatabaseDefaults)
        {
            SetSQLProps();
            if (useDatabaseDefaults)
            {
                ForceDefaults();
            }
            MarkNew();
        }

        public ProductWithCategory(object keyID)
        {
            SetSQLProps();
            LoadByKey(keyID);
        }

        public ProductWithCategory(string columnName, object columnValue)
        {
            SetSQLProps();
            LoadByParam(columnName, columnValue);
        }

        #endregion

        #region Props


        [XmlAttribute("Id")]
        [Bindable(true)]
        public Guid Id
        {
            get
            {
                return GetColumnValue<Guid>("Id");
            }
            set
            {
                SetColumnValue("Id", value);
            }
        }

        [XmlAttribute("Exergue")]
        [Bindable(true)]
        public string Exergue
        {
            get
            {
                return GetColumnValue<string>("Exergue");
            }
            set
            {
                SetColumnValue("Exergue", value);
            }
        }

        [XmlAttribute("Brand")]
        [Bindable(true)]
        public Guid? Brand
        {
            get
            {
                return GetColumnValue<Guid?>("Brand");
            }
            set
            {
                SetColumnValue("Brand", value);
            }
        }

        [XmlAttribute("Price")]
        [Bindable(true)]
        public double? Price
        {
            get
            {
                return GetColumnValue<double?>("Price");
            }
            set
            {
                SetColumnValue("Price", value);
            }
        }

        [XmlAttribute("Image")]
        [Bindable(true)]
        public string Image
        {
            get
            {
                return GetColumnValue<string>("Image");
            }
            set
            {
                SetColumnValue("Image", value);
            }
        }

        [XmlAttribute("SmallImage")]
        [Bindable(true)]
        public string SmallImage
        {
            get
            {
                return GetColumnValue<string>("SmallImage");
            }
            set
            {
                SetColumnValue("SmallImage", value);
            }
        }

        [XmlAttribute("Name")]
        [Bindable(true)]
        public string Name
        {
            get
            {
                return GetColumnValue<string>("Name");
            }
            set
            {
                SetColumnValue("Name", value);
            }
        }

        [XmlAttribute("Url")]
        [Bindable(true)]
        public string Url
        {
            get
            {
                return GetColumnValue<string>("Url");
            }
            set
            {
                SetColumnValue("Url", value);
            }
        }

        [XmlAttribute("Title")]
        [Bindable(true)]
        public string Title
        {
            get
            {
                return GetColumnValue<string>("Title");
            }
            set
            {
                SetColumnValue("Title", value);
            }
        }

        [XmlAttribute("HeaderImage")]
        [Bindable(true)]
        public string HeaderImage
        {
            get
            {
                return GetColumnValue<string>("HeaderImage");
            }
            set
            {
                SetColumnValue("HeaderImage", value);
            }
        }

        [XmlAttribute("UseInChildUrls")]
        [Bindable(true)]
        public bool? UseInChildUrls
        {
            get
            {
                return GetColumnValue<bool?>("UseInChildUrls");
            }
            set
            {
                SetColumnValue("UseInChildUrls", value);
            }
        }

        [XmlAttribute("Content")]
        [Bindable(true)]
        public string Content
        {
            get
            {
                return GetColumnValue<string>("Content");
            }
            set
            {
                SetColumnValue("Content", value);
            }
        }

        [XmlAttribute("BrowserTitle")]
        [Bindable(true)]
        public string BrowserTitle
        {
            get
            {
                return GetColumnValue<string>("BrowserTitle");
            }
            set
            {
                SetColumnValue("BrowserTitle", value);
            }
        }

        [XmlAttribute("ContentBlock")]
        [Bindable(true)]
        public string ContentBlock
        {
            get
            {
                return GetColumnValue<string>("ContentBlock");
            }
            set
            {
                SetColumnValue("ContentBlock", value);
            }
        }

        [XmlAttribute("MetaKeywords")]
        [Bindable(true)]
        public string MetaKeywords
        {
            get
            {
                return GetColumnValue<string>("MetaKeywords");
            }
            set
            {
                SetColumnValue("MetaKeywords", value);
            }
        }

        [XmlAttribute("MetaDescription")]
        [Bindable(true)]
        public string MetaDescription
        {
            get
            {
                return GetColumnValue<string>("MetaDescription");
            }
            set
            {
                SetColumnValue("MetaDescription", value);
            }
        }

        [XmlAttribute("NodeId")]
        [Bindable(true)]
        public Guid NodeId
        {
            get
            {
                return GetColumnValue<Guid>("NodeId");
            }
            set
            {
                SetColumnValue("NodeId", value);
            }
        }

        [XmlAttribute("CultureName")]
        [Bindable(true)]
        public string CultureName
        {
            get
            {
                return GetColumnValue<string>("CultureName");
            }
            set
            {
                SetColumnValue("CultureName", value);
            }
        }

        [XmlAttribute("IsActive")]
        [Bindable(true)]
        public bool IsActive
        {
            get
            {
                return GetColumnValue<bool>("IsActive");
            }
            set
            {
                SetColumnValue("IsActive", value);
            }
        }

        [XmlAttribute("IsSubEntity")]
        [Bindable(true)]
        public bool IsSubEntity
        {
            get
            {
                return GetColumnValue<bool>("IsSubEntity");
            }
            set
            {
                SetColumnValue("IsSubEntity", value);
            }
        }

        [XmlAttribute("HasModifications")]
        [Bindable(true)]
        public bool HasModifications
        {
            get
            {
                return GetColumnValue<bool>("HasModifications");
            }
            set
            {
                SetColumnValue("HasModifications", value);
            }
        }

        [XmlAttribute("Revision")]
        [Bindable(true)]
        public int? Revision
        {
            get
            {
                return GetColumnValue<int?>("Revision");
            }
            set
            {
                SetColumnValue("Revision", value);
            }
        }

        [XmlAttribute("Generation")]
        [Bindable(true)]
        public int Generation
        {
            get
            {
                return GetColumnValue<int>("Generation");
            }
            set
            {
                SetColumnValue("Generation", value);
            }
        }

        [XmlAttribute("CreatedOn")]
        [Bindable(true)]
        public DateTime CreatedOn
        {
            get
            {
                return GetColumnValue<DateTime>("CreatedOn");
            }
            set
            {
                SetColumnValue("CreatedOn", value);
            }
        }

        [XmlAttribute("Depth")]
        [Bindable(true)]
        public int Depth
        {
            get
            {
                return GetColumnValue<int>("Depth");
            }
            set
            {
                SetColumnValue("Depth", value);
            }
        }

        [XmlAttribute("ParentNodeId")]
        [Bindable(true)]
        public Guid? ParentNodeId
        {
            get
            {
                return GetColumnValue<Guid?>("ParentNodeId");
            }
            set
            {
                SetColumnValue("ParentNodeId", value);
            }
        }

        [XmlAttribute("Path")]
        [Bindable(true)]
        public string Path
        {
            get
            {
                return GetColumnValue<string>("Path");
            }
            set
            {
                SetColumnValue("Path", value);
            }
        }

        [XmlAttribute("Position")]
        [Bindable(true)]
        public short Position
        {
            get
            {
                return GetColumnValue<short>("Position");
            }
            set
            {
                SetColumnValue("Position", value);
            }
        }

        [XmlAttribute("TypeId")]
        [Bindable(true)]
        public Guid TypeId
        {
            get
            {
                return GetColumnValue<Guid>("TypeId");
            }
            set
            {
                SetColumnValue("TypeId", value);
            }
        }

        [XmlAttribute("ModifiedOn")]
        [Bindable(true)]
        public DateTime? ModifiedOn
        {
            get
            {
                return GetColumnValue<DateTime?>("ModifiedOn");
            }
            set
            {
                SetColumnValue("ModifiedOn", value);
            }
        }

        [XmlAttribute("BrandName")]
        [Bindable(true)]
        public string BrandName
        {
            get
            {
                return GetColumnValue<string>("BrandName");
            }
            set
            {
                SetColumnValue("BrandName", value);
            }
        }

        [XmlAttribute("Categories")]
        [Bindable(true)]
        public Guid? Categories
        {
            get
            {
                return GetColumnValue<Guid?>("Categories");
            }
            set
            {
                SetColumnValue("Categories", value);
            }
        }

        #endregion

        #region Columns Struct
        public struct Columns
        {


            public static string Id = @"Id";

            public static string Exergue = @"Exergue";

            public static string Brand = @"Brand";

            public static string Price = @"Price";

            public static string Image = @"Image";

            public static string SmallImage = @"SmallImage";

            public static string Name = @"Name";

            public static string Url = @"Url";

            public static string Title = @"Title";

            public static string HeaderImage = @"HeaderImage";

            public static string UseInChildUrls = @"UseInChildUrls";

            public static string Content = @"Content";

            public static string BrowserTitle = @"BrowserTitle";

            public static string ContentBlock = @"ContentBlock";

            public static string MetaKeywords = @"MetaKeywords";

            public static string MetaDescription = @"MetaDescription";

            public static string NodeId = @"NodeId";

            public static string CultureName = @"CultureName";

            public static string IsActive = @"IsActive";

            public static string IsSubEntity = @"IsSubEntity";

            public static string HasModifications = @"HasModifications";

            public static string Revision = @"Revision";

            public static string Generation = @"Generation";

            public static string CreatedOn = @"CreatedOn";

            public static string Depth = @"Depth";

            public static string ParentNodeId = @"ParentNodeId";

            public static string Path = @"Path";

            public static string Position = @"Position";

            public static string TypeId = @"TypeId";

            public static string ModifiedOn = @"ModifiedOn";

            public static string BrandName = @"BrandName";

            public static string Categories = @"Categories";

        }
        #endregion


        #region IAbstractRecord Members
        public new CT GetColumnValue<CT>(string columnName)
        {
            return base.GetColumnValue<CT>(columnName);
        }
        public object GetColumnValue(string columnName)
        {
            return base.GetColumnValue<object>(columnName);
        }
        #endregion

    }
}
